package cn.edu.sjtu.FaH.excellent;

import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.content.Context;

public class MainActivity extends Activity{
     public void onCreate(Bundle savedInstanceState)
     {
    	 AlarmManager aM = null;
    	 
    	 super.onCreate(savedInstanceState);
    	 setContentView(R.layout.table );
		Intent intent =new Intent(MainActivity.this,Receiver.class);
    	 
    	PendingIntent pi =PendingIntent.getBroadcast(MainActivity.this, 0, intent, 0); 
        aM =  (AlarmManager)getSystemService(Context.ALARM_SERVICE);

		aM.set(AlarmManager.RTC_WAKEUP,System.currentTimeMillis()+2000,pi);
		overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
//         startActivity(intent);
//         MainActivity.this.finish();
         
     }
}